<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:r="http://ricchieri.com/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>


	<ui:composition template="../../templates/commonLayoutReservation.xhtml">
		<ui:define name="title">#{msg.titleReservation}</ui:define>
		<ui:define name="content">
			<h:form id="scheduleCharterForm">
				<h2>#{msg.myNextTravels}</h2> 
				<h:panelGrid columns="2">
					<h:outputLabel value="#{msg.tripOrientation}" />
					<p:selectOneMenu value="#{searchNextTravelsMB.scheduleCharterFilter.trip}">
						<f:selectItem itemLabel="#{msg.defaultComboValue}" itemValue="" />
						<f:selectItems value="#{searchNextTravelsMB.trips}" />
					</p:selectOneMenu>
					
					<h:outputLabel value="#{msg.to}" />
					<p:calendar pattern="dd/MM/yyyy" showOn="button"
						readOnlyInputText="true"
						value="#{searchNextTravelsMB.scheduleCharterFilter.finish}">
						<f:convertDateTime pattern="dd/MM/yyyy" timeZone="GMT-3" />
					</p:calendar>
				</h:panelGrid>
				
				<h:panelGrid columns="2" style="margin-top:10px; text-align:center">
	     			<r:commandLinkCustom id="reset" action="#{searchNextTravelsMB}" method="reset" icon="icon-eraser" message="#{msg.resetButton}"/>
     				<r:commandLinkCustom id="search" action="#{searchNextTravelsMB}" method="search" icon="icon-search" message="#{msg.searchButton}"/>
	     	 	</h:panelGrid>
	     	 	
	     	 	
	     	 	<p:blockUI block="scheduleCharterTable" trigger="scheduleCharterTable">  
			        #{msg.loading}<br />  
			        <p:graphicImage value="/images/ajax-loader.gif"/>  
			    </p:blockUI>
	     	 	<p:dataTable var="scheduleCharter" value="#{searchNextTravelsMB.scheduleCharterLazyDataModel}" 
	     	 		style="padding-top:15px" paginator="true" lazy="true" id="scheduleCharterTable"
	     	 		rows="10"
	     	 		paginatorPosition="bottom" emptyMessage="#{msg.noRecordsFound}">

	        		<p:column headerText="#{msg.date}" style="width:20%">  
		            	<h:outputText value="#{searchNextTravelsMB.formatDate(scheduleCharter.schedule.date)}" />   
	        		</p:column> 
	        		
	        		<p:column headerText="#{msg.time}" style="width:20%">  
		            	<h:outputText value="#{scheduleCharter.schedule.time}" />   
	        		</p:column> 
	        		
	        		<p:column headerText="#{msg.tripOrientation}" style="width:20%">  
		            	<h:outputText value="#{scheduleCharter.trip.getFormatTrip()}" />   
	        		</p:column> 
	        		
	        		<p:column headerText="#{msg.charterNumber}" style="width:20%">  
		            	<h:outputText value="#{scheduleCharter.charter.charterNumber}" />   
	        		</p:column> 
	
	        		
	        	</p:dataTable>
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>
